{% extends 'info-base.html' %}
{% load staticfiles %}

    {% block info_left %}
     <aside class="l_box">
    <div class="search">
      <form action="{% url 'article:search' %}" method="get" name="searchform" id="searchform">
        <input name="keyboard" id="keyboard" class="input_text" value="请输入关键字词" style="color: rgb(153, 153, 153);" onfocus="if(value=='请输入关键字词'){this.style.color='#000';value=''}" onblur="if(value==''){this.style.color='#999';value='请输入关键字词'}" type="text">
        <input name="show" value="title" type="hidden">
        <input name="tempid" value="1" type="hidden">
        <input name="tbname" value="news" type="hidden">
        <input name="Submit" class="input_submit" value="搜索" type="submit">
      </form>
    </div>
    <div class="fenlei">
      <h2>文章分类</h2>
      <ul>
          {% for cc in cate_fen %}
        <li><a href="/">{{ cc.name }}（{{ cc.num_posts }}）</a></li>
          {% endfor%}

      </ul>
    </div>
    <div class="tuijian">
      <h2>站长推荐</h2>
      <ul>
          {% for recommend in recommend_articles %}
          <li><a href="{{ recommend.get_absolute_url }}">{{ recommend.title }}</a></li>
          {% endfor %}

      </ul>
    </div>
    <div class="tuijian">
      <h2>点击排行</h2>
      <ul>
          {% for click_article in click_articles %}

              <li><a href="{{ click_article.get_absolute_url }}">{{ click_article.title }}</a></li>


          {% endfor %}
      </ul>
    </div>
    <div class="cloud">
      <h2>标签云</h2>
      <ul>
          {% for a_tag in tag_all %}
          <a href="/">{{ a_tag.name }}</a>
          {% endfor %}
      </ul>
    </div>
    <div class="guanzhu">
      <h2>关注我 么么哒</h2>
      <ul>
        <img src="{% static 'images/mao.gif' %}">
      </ul>
    </div>
  </aside>
    {% endblock %}


    {% block info_main %}
        <main class="r_box">
        {% for suibi in suibi_pages.object_list %}
                <li><i><a href="{{ suibi.get_absolute_url }}"><img src="{{ MEDIA_URL }}{{ suibi.image }}"></a></i>

                <h3><a href="{{ suibi.get_absolute_url }}">{{ suibi.title }}</a></h3>
                <p>{{ suibi.desc}}</p>
                </li>
 {% endfor %}



  </main>
     <div class="pageturn" style="padding-left: 500px">

            <div class="pagelist">
{#                <a class="allpage"><b>99</b></a>&nbsp;&nbsp;#}
                {% if suibi_pages.has_previous %}  <!--如果有前页就显示--->
                        <li class="long" style="float: left"><a href="?page={{ suibi_pages.previous_page_number }}">上一页</a></li>
                {% endif %}
{#                {% for page in suibi_pages.pages %}#}
{#                        {% if page %}#}
{#                                {% ifequal page suibi_pages.paginator.page_range %}   <!--当前页显示--->#}
{#                                    <li class="active" style="float: left"><a href="?page={{ page }}">{{ page }}</a></li>#}
{#                                {% else %}#}
{#                                    <li style="float: left"><a href="?page={{ page }}" class="page">{{ page }}</a></li>#}
{#                                {% endifequal %}#}
{#                        {% else %}#}
{#                                <li class="none" style="float: left"><a href="">...</a></li>#}
{#                        {% endif %}#}
{#                {% endfor %}#}
                {% if suibi_pages.has_next %}
                            <li class="long" style="float: left"><a href="?page={{ suibi_pages.next_page_number }}">下一页</a></li>

                {% endif %}
                  </ul>

  </div>
        </div>
{% endblock %}
